package com.rw.coco.api;

import com.rw.coco.Coco;
import com.rw.coco.event.MiraiGroupMessageEvent;
import net.mamoe.mirai.event.GlobalEventChannel;
import net.mamoe.mirai.event.events.GroupMessageEvent;

public class MiraiGroupMessageHandler {
    public static void onEnable(Coco coco) {
        GlobalEventChannel.INSTANCE.subscribeAlways(GroupMessageEvent.class, event -> {
            coco.getMessageHandler().handle(new MiraiGroupMessageEvent(event));
        });
    }
}
